package com.bigcat.gulimall.demo.java17;

import org.apache.commons.lang3.StringUtils;

import java.util.regex.Pattern;

/**
 * @author sufer_yuan
 * @since 2024/3/25
 */
public class test {

    public static void main(String[] args) {
        boolean b = bikeIdCanUse("20212013");
        System.out.println(b);
    }

    public static boolean bikeIdCanUse(String bikeId) {
        String BIKE_NULL_NUM_REG = "0*";
        String BIKE_ERR_NUM_REG = "F*";
        return !(StringUtils.isEmpty(bikeId)
                || Pattern.matches(BIKE_ERR_NUM_REG, bikeId.toUpperCase())
                || Pattern.matches(BIKE_NULL_NUM_REG, bikeId.toUpperCase()));
    }
}
